package com.platform;

import org.apache.catalina.connector.Connector;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Description 启动入口
 * @Date 2019/12/24
 * @Created by 67068
 */
@EnableTransactionManagement
@SpringBootApplication(scanBasePackages = "com.platform")
public class ApiApplication {


    public static void main(String[] args) {

        SpringApplication.run(ApiApplication.class,args);

    }
    /*@Bean
    public ServletWebServerFactory servletContainer() {
        TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
        tomcat.addAdditionalTomcatConnectors(createHTTPConnector());
        return tomcat;
    }

    private Connector createHTTPConnector() {
        Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
        //同时启用http（80）、https（8443）两个端口
        connector.setScheme("http");
        connector.setSecure(false);
        connector.setPort(80);
        connector.setRedirectPort(443);

        // fixed More than the maximum allowed number of cookies, [200], springboot
        connector.setMaxCookieCount(2000);

        return connector;
    }*/
}
